let app = getApp()
Component({
    properties: {
      type:String,
      item: {
        type: Array
      },
      list: {
        type: Array
      }
      },
      data:{
        moneySign:'¥'
      },
    lifetimes: {
        attached: function () {
            console.log('内容')
            console.log(this.data.list)
         }
      },
    methods: {
      jumpdetail:function(e){
        var id=e.currentTarget.dataset.id;
        if(this.data.type=='diy_course'){
          wx.navigateTo({ 
            url: '/yb_shopv2/native/all/index?type=course_detail&id='+id,
         })
        }
        if(this.data.type=='diy_series'){
          wx.navigateTo({ 
            url: '/yb_shopv2/native/all/index?type=series_detail&id='+id,
         })
        }
      },
      lookmore:function(){
        if(this.data.type=='diy_course'){
          wx.navigateTo({ 
            url: '/yb_shopv2/native/all/index?type=course_list',
         })
        }
        if(this.data.type=='diy_series'){
          wx.navigateTo({ 
            url: '/yb_shopv2/native/all/index?type=series_list',
         })
        }
      }
    }
});
